<script lang="ts">
import { defineComponent } from "vue";

import FormCheckbox from "@/components/form/checkbox.vue";

export default defineComponent({
  components: { FormCheckbox },
  props: {
    isActive: Boolean,
    text: String,
  },
});
</script>

<template>
  <view
    class="certificate-item"
    :style="{ backgroundColor: isActive ? 'rgba(250, 100, 0, 0.08)' : '' }"
  >
    <view class="certificate-item-line"></view>
    <view class="certificate-item-title">{{ text }}</view>
    <FormCheckbox :modelValue="isActive" />
  </view>
</template>

<style lang="scss">
.certificate-item {
  display: flex;
  align-items: center;
  height: 90rpx;
  padding-left: 30rpx;
  padding-right: 50rpx;
  border-radius: 20rpx 20rpx 0 0;

  .certificate-item-line {
    width: 6rpx;
    height: 28rpx;
    border-radius: 4rpx;
    background-color: #ff7900;
  }

  .certificate-item-title {
    flex-grow: 1;
    min-width: 0;
    margin-left: 20rpx;
    font-size: 30rpx;
    color: #333333;
    line-height: 42rpx;
  }
}
</style>